1. The Field of the Invention
The present invention relates to display rendering processes and, more particularly, to font glyph rendering processes that include alpha value correction.
2. Background and Relevant Art
In standard software text rendering, one or more font glyphs represent each image of text that is displayed at a display device. Likewise, each font glyph is represented by one or more blending coefficients that represent how much of a font glyph's foreground color should be added to the background for each pixel that is used to display the font glyph. These blending coefficients are typically referred to as alpha (α) values. Other images can also be represented by a blending between a foreground and a background.
Once the alpha values are determined, they can be used to blend the foreground and the background colors of each pixel. Blending ideally occurs in linear color space where, for example, a minimum value indicates no photons will be used to render a pixel and where a maximum value indicates a maximum amount of photons will be used. The pixel colors that are derived from blending, however, typically have to undergo a gamma correction process before they are rendered in order to compensate for the non-linearity in how the display device renders color. Gamma correction essentially compensates for a gamma value of the display device. The gamma value of display devices may vary from device to device. The blending and gamma correction processes utilized to render images at a display device are well-known rendering processes in the art.
Blending and gamma correction typically occur through software applications. It has been realized, however, that the text rendering processes could be performed much more quickly if they were to be performed by a dedicated hardware component, such as a graphics processing unit (GPU), instead of requiring the resources of the central processing unit (CPU). One problem with performing blending with a GPU, however, is that existing GPUs are not configured to perform gamma correction. And without gamma correction, if the alpha values are filtered via the ClearType method, the rendered text would have undesired color fringes around the edges of the displayed text characters due to the non-linearity (gamma value) of the display devices. The problem is further compounded because the background values are stored in the GPU and are only slowly accessible by the CPU.
In the Microsoft NT4 operating system, gamma correction is not performed after blending, in order to save CPU cycles. As an approximation, the alpha values are adjusted by performing gamma correction on the alpha values themselves before blending. This approximation, however, is inexact because it does not take into account whether the foreground color is dark or light. Adjusting the alpha while ignoring the foreground color results in increasing the error of the approximation for half of the possible foreground colors.
Accordingly, there currently exists a need in the art for improved methods for accelerating text rendering, without access to the background colors, without requiring gamma correction, but while utilizing knowledge of the foreground colors.